
import request from '@/utils/request'

// 登录获取token
export const login = data => {
  return request.post('/v1_0/authorizations', data)
}

// 获取验证码
export const getCode = (mobile) => {
  return request.get(`/v1_0/sms/codes/${mobile}`)
}

// 获取用户信息
export const getUserInfo = () => {
  return request.get('/v1_0/user')
}

// 用户token失效重新获取用户token
export const resetToken = () => {
  return request.put('/v1_0/authorizations')
}

// 测试接口
export const demo = () => {
  return request.get('/v1_0/user/channels')
}
